public class Human {
    // 属性
    public String name;
    public String gender;
    public int age;
    public Dog pet;


    // 方法
    public void drive(Car c) {
        System.out.println(this.name + "在驾驶" + c.name);
    }

    public void talk() {

    }

    public Human(String name, Dog pet) {
        this.name = name;
        this.pet = pet;
    }

    public Human(String name) { // zhangsan this 指当前实例
        this.name = name;
    }

    public Human(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Human(String name, String gender, int age) {
        this.name = name;
        this.gender = gender;
        this.age = age;
    }
    // 构造
//    public Human(String getName) {
//        name = getName;
//    }
//
//    public Human(String getName, int getAge) {
//        name = getName;
//        age = getAge;
//    }

}
